#include "MyString.h"
#include "TelePhoneBook.h"


enum data
{
    INSERT = 1,
    DELATE,
    FIND,
    MODFIY,
    PRINT,
    QUIT
};

int main()
{
    Tel_Book t;
    Init_Tel_Book(&t);

    while(1)
    {
        
        UI();
        int n = 0;
        printf("请输入功能序号：\n");
        scanf("%d",&n);
        if(n < 1 || n > 6)
        {
            printf("请输入正确序号！\n");
            continue;
        }  
        switch(n)
        {
            case INSERT:
                printf("当前正在新增一名学生信息\n");
                Insert_Person(&t);
                break;
            case DELATE:
                Del_Person(&t);
                break;
            case FIND:
                Find_Person(&t);
                break;
            case MODFIY:
                Mod_Person(&t);
                break;
            case PRINT:
                List_Person(&t);
                break;
            case QUIT:
                return 0;
                break;
            default:
                
                break;
                
        }
        if (t.szie >= 8)
        {
            printf("存储过多！\n");
        }
        
    }
    return 0;
}